Copyright: Copyright ® 1996 by Christopher S L Heng.
Citation: Copyright ® 1996 by Christopher S L Heng. All rights reserved.


LOGTIME

USER’S GUIDE

Getting Started

Introduction

Copyright

Packing list

Installing for Windows

Installing for Linux

Contacting the Author

How to Log Your Usage Time

Starting and Stopping the Timer in Windows

Starting and Stopping the Timer in Linux

How to Check and Maintain Your Log

How to Check Your Login Usage

The Usage Log Dialog Box

Usage Log for a Specific Month

Deleting the Log Records

The Delete Log Entries Dialog Box

Printing the Usage Log

The Print Dialog Box

How to Configure LOGTIME

How to Configure LOGTIME

The General Options Dialog Box

The Charges Dialog Box

The Peak Times Dialog Box

The Exceptions to Peak Dialog Box

The Button Bar

The Font Dialog Box

The Margins Dialog Box

Changing the Printer

The Print Setup Dialog Box

How to Uninstall LOGTIME

How to Uninstall LOGTIME

USER’S REFERENCE MANUAL

Command Line Options

LOGTIME for Windows Command Line Options

LOGTIME for Linux Command Line Options

The Menu

The File Menu

The Options Menu

The Help Menu

The Dialog Boxes

The Usage Log Dialog Box

Usage Log for a Specific Month

The Delete Log Entries Dialog Box

The Print Dialog Box

The Print Setup Dialog Box

The General Options Dialog Box

The Charges Dialog Box

The Peak Times Dialog Box

The Exceptions to Peak Dialog Box

The Font Dialog Box

The Margins Dialog Box

The Button Bar

The Button Bar

The Status Bar

The Status Bar

Keyboard Shortcuts

Keyboard Shortcuts

Differences Between the Linux and Windows Versions

Differences Between the Linux and Windows Versions

Glossary


LOGTIME FOR WINDOWS COMMAND LINE OPTIONS

LOGTIME for Windows may be invoked as follows:

LOGTIME [flags]

where the optional [flags] may be one of the following options.

/b 	Start the log timer. See Starting and Stopping the Timer in Windows for more details.

/e 	Stop the log timer. See Starting and Stopping the Timer in Windows for more details.

/C <file> 	Specify the full path (ie directory and filename) of the LOGTIME configuration file. Use this to override the default configuration file LOGTIME.INI which is assumed to be in the LOGTIME data directory. Note that this flag has the highest precedence; ie, if both /C and /D are given, LOGTIME will look for the configuration file in the path specified by /C <config_file> and look for the data files in the directory specified by /D <data_dir>.

/D <dir> 	Specify the path of directory where LOGTIME looks for its configuration and data files. By default, LOGTIME assumes that its configuration and data files are kept in the directory from which LOGTIME was started. The directory specified by this option also overrides the directory specified in the value of the LOGTIMEDIR environment variable.

/E 	Ignore environment variable LOGTIMEDIR. This causes LOGTIME to ignore the environment variable LOGTIMEDIR. Normally, if the environment variable LOGTIMEDIR is set, and the command line option /D is not given, LOGTIME will look for its data files in the directory specified by the value of the environment variable LOGTIMEDIR.

The various options may be preceded by the '-' (hyphen) character instead of the '/' (slash) character.


LOGTIME FOR LINUX COMMAND LINE OPTIONS

logtime for Linux may be invoked as follows:

logtime [flags]

where the optional [flags] may be one of the following options.

-b 	Start the log timer. See Starting and Stopping the Timer in Linux for more details.

-d 	Causes logtime to delete the entries for the month and year specified by the -m and -y options (or the current month by default). The log usage results are not displayed.

-e 	Stop the log timer. See Starting and Stopping the Timer in Linux for more details.

-h 	Display a short usage message explaining the various options available.

-m 	Specify the month on which the program is to take action. If -d is also given, this is the month to delete. If -d is not given, the usage log will be displayed for this month. The default month is the current month. Valid months are in the range "Jan" to "Dec" (case is not significant).

-q 	Quiet mode (default).

-r <nn> 	(Deprecated option.) Rounding. -r 0 means to always round up to the next highest minute when counting logged in time. -r 1 means to round up if there are more or equal to 30 seconds. -r 2 means to round up if there are more or equal to 31 seconds. -r 3 means to never round up (ie, always truncate). This flag temporarily overrides the LOGTIME.INI values. It is present to assist you to find out which rounding option suits your situation best. This option is deprecated and will likely be removed in a future version of logtime . You can always change the LOGTIME.INI file to change the default rounding value. You can even have different configuration files which you can specify to logtime with the -C flag described above for testing.

-v 	Verbose mode. Tries to be more informative.

-y 	Specifies the year for which logtime is to either display results or delete log entries. The year should be in century format, ie, specify the year "1996" as "1996" and not "96". The default year is the current year.

-C <file> 	Specify the full path (ie directory and filename) of the logtime configuration file. Use this to override the default configuration file logtime.ini which is assumed to be in the logtime data directory. Note that this flag has the highest precedence; ie, if both -C and -D are given, logtime will look for the configuration file in the path specified by -C <config_file> and look for the data files in the directory specified by -D <data_dir>.

-D <dir> 	Specify the path of directory where logtime looks for its configuration and data files. By default, logtime assumes that its configuration and data files are kept in the LOGTIME directory in the user's home directory. If this is not true, you need to use the -D flag to specify the directory. The directory specified by this option also overrides the directory specified in the value of the LOGTIMEDIR environment variable.

-E 	Ignore environment variable LOGTIMEDIR. This causes logtime to ignore the environment variable LOGTIMEDIR. Normally, if the environment variable LOGTIMEDIR is set, and the command line option -D is not given, logtime will look for its data files in the directory specified by the value of the environment variable LOGTIMEDIR.

-V 	Show the version information and quit without doing anything else.

Invoking logtime without any arguments will cause the program to display the usage log for the current month.


DELETING THE USAGE LOG

From time to time, you may wish to delete entries from the log to keep the size of the log file manageable. You may do this inone of the following ways:

• 	Choose Delete from the File menu.

• 	Press the F4 key.

• 	Press the delete icon on the toolbar.

This will cause the Delete Log Dialog Box to be displayed.


THE DELETE LOG ENTRIES DIALOG BOX

This dialog box allows you to choose the month and year of the log that you wish to delete.

Specify the month you wish by using the arrow keys. You can cause the list of months to be displayed by entering F4 or the Alt-DownArrow key or by clicking the down arrow key on the box with the mouse. Alternatively, you can type the first letter of the month to go to the first month that begins with that letter.

Year allows you to enter the year for which you want the delete the log. The year must be in the century format. For example, the year 1996 should be entered as 1996 and not 96.

If you configured LOGTIME not to request confirmation when deleting log entries, entering Ok will cause the log entries for the month to be deleted.

If you configured LOGTIME to request confirmation on delete, a message box, somewhat like the following, will be displayed asking you for confirmation before it deletes the log entries.

If you enter Yes , the log entries for the month you selected will be removed. If you enter No , no action will be taken. You can configure this behaviour from the General Options Dialog Box.


DIFFERENCES BETWEEN THE WINDOWS AND LINUX VERSIONS

While the Linux and Windows versions share the same configuration and data files, there are some differences between the two versions. (Please note that this is not an exhaustive list.)

• 	The Linux version has more command line options than the Windows version. This is needed since it is otherwise impossible to tell logtime for Linux which month's log to display if you do not want the current month. See LOGTIME for Windows Command Line Options and LOGTIME for Linux Command Line Options for more details on the command line options supported under each system.

• 	There is no way to configure the Linux version except to manually edit the LOGTIME.INI file or to invoke the Windows version and configure using the Options menu.

• 	To print in the Windows version, you can select Print from the File Menu. To print in the Linux version, simply redirect the output to the printer or pipe it to your print spooler.

• 	The Windows version looks for, and creates, by default, the data and configuration files in the directory from which it was executed unless the directory is overridden by the -D option from the command line or the LOGTIMEDIR environment variable. It does not create the directory if it does not exist. The Linux version, on the other hand, assumes the data directory is in the LOGTIME subdirectory in the user's home directory, and will create the subdirectory if it does not exist.

• 	The Windows version sports an interactive GUI interface with menus, button bars, etc, while Linux version is command line driven.


THE FONT DIALOG BOX

The Font Dialog Box allows you to choose the font and point sizes.

Choose the font from the list box or type in the name into the edit box. You can also select the point size of the font that you wish your hard copy results to have. A sample of how the font appears will be shown in the Sample box at the lower right hand side of the dialog box. When you have completed your selection, hit the Ok button to accept your choices. If you wish to abort your selection, just hit the Cancel button and the changes you made here will be ignored.


INTRODUCTION

LOGTIME was designed to allow users to keep track of the amount of time taken and the charges accumulated when logging into an internet service provider (“ISP”). This might be useful if you use an ISP that charges you for the time you take when logged onto your account.

LOGTIME has the following features:

• 	It keeps track of time by being called from your login and logout script in your dial-up program. It can, of course, be called manually as well, should your dial-up program not have any means by which you can execute external programs.

• 	Some ISPs charge different rates for connections made during the day and those in the night and/or connections made on a public holiday or weekend and those on a working day. LOGTIME is able to distinguish between such connections and display the appropriate results if configured correctly.

• 	It displays the amount of time you have spent as well as the charges you have accumulated so far. If your ISP provides you with a block of time which you have prepaid, LOGTIME will display the amount of time that you have left for that month (as compared to the prepaid time) or the amount of time in excess of the prepaid time that you have used.

• 	The log file, which contains record of login/logout times, and the configuration file are compatible between the versions of LOGTIME for Windows and Linux. You can keep the log and configuration files in a place accessible by the LOGTIME for the two systems, and use one set of files for accesses made in both systems!

• 	LOGTIME is configurable: you can change the charges it is to calculate for the time you clock, you can modify the way LOGTIME rounds the time clocked, you can set the days which it is to consider as public holidays, or change the times which it is to consider as working hours.

Note that while LOGTIME can give you an idea of the amount of time and cost you have clocked so far, the results supplied by LOGTIME may not agree with those calculated by your ISP. Differences can arise as a result of many reasons: your ISP may start and stop clocking at a different moment than the moment your script calls LOGTIME , your ISP may use a different method to round or truncate sessions that take less than minute, etc.


COPYRIGHT

Copyright © 1996 by Christopher S. L. Heng. All rights reserved.

The programs, the accompanying files and documentation are copyrighted © 1996 by Christopher S. L. Heng. All rights reserved.

For the purpose of this copyright statement, the programs, their accompanying files and documentation are collectively referred to as the "package".

You may use and distribute the programs, their accompanying files and documentation free of charge only if you agree to all of the following conditions:

1. 	All the files that are part of this package must be distributed.

2. 	The files must not be modified in any way. You may however archive the files using a different archive format if you like, for example, using the LZH format or the TAR format.

3. 	No additional files may be added to the package.

4. 	THERE IS NO WARRANTY ON THE PROGRAM AND ITS ACCOMPANYING FILES AND DOCUMENTATION, NOT EVEN THE IMPLIED WARRANTY OF MECHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. YOU AGREE TO BEAR ALL RISKS AND LIABILITIES ARISING FROM THE USE OF THE PROGRAMS AND THE ACCOMPANYING FILES AND DOCUMENTATION AND THE INFORMATION PROVIDED BY THE PROGRAMS AND THE DOCUMENTATION.

5. 	You may charge a nominal fee to recover the cost of media (such as for the cost of CDROM or diskettes) and copying when distributing this package as long as it is clear that you are not charging for the package itself.

If you cannot accept any of the above conditions, you may not use or distribute the program and its accompanying files.

If you wish to distribute the package, and are unsure whether your distribution meets the above conditions, please try contacting me, and furnish me all the necessary details so that I can let you know.

See also: Contacting the Author


PACKING LIST

The following files are included in the LOGTIME package:

readme.txt 	First file you should read

logtime.exe 	Windows version of LOGTIME

logtime.hlp 	Online manual for the Windows version of LOGTIME

ctl3d.dll 	Support file for the Windows version of LOGTIME

logtime 	Linux version of logtime (a.out executable)

logtime.1 	Manual page for the Linux version of logtime

sample.ini 	Sample configuration file


INSTALLING FOR WINDOWS

To install LOGTIME for Windows, simply copy all the LOGTIME files into a directory on your hard disk. For example, if you wish to place LOGTIME in the C:\LOGTIME directory of your hard disk, simply create the directory C:\LOGTIME (you may do this under DOS by typing "MKDIR \LOGTIME" while you are at the C:\> prompt) and copy all the LOGTIME files into that directory (you may do this under DOS by typing "COPY *.* C:\LOGTIME" if your current directory contains the only the LOGTIME files).

Next you will need to find some way so that LOGTIME is executed each time you connect to and disconnect from your Internet Service Provider ("ISP"). If you run a winsock package that executes a script file, place a call to

logtime -b

in your login script file when there is a successful login; and a call to

logtime -e

in your logout script file when your winsock program logs off from the ISP.

If your winsock package does not execute a script file, you need to invoke it manually each time you log in and log out. It might be convenient to associate an item in a Program Manager group with the command

logtime -b

and place the text "Begin logging" as the description for that item; and an item for the command

logtime -e

and place the text "End logging" as the description for that item.

This way, each time you get a successful connection with your winsock dialer, just double-click the "Begin logging" icon in your Program Manager to start the logging; and once you log out, double-click the "End logging" icon in your Program Manager.

The -b parameter to LOGTIME starts the clock to time the session, and the -e parameter to LOGTIME stops the stop clock.

If you wish to share the same configuration and data files for both your Linux and Windows system, install LOGTIME for Windows and its accompanying files to a directory that is mounted by Linux. In your Linux SLIP/PPP script, specify that directory using the -D option to the Linux logtime . For more information about this, see Installing for Linux.

You need to configure LOGTIME before you can use it in any meaningful way. See How to Configure LOGTIME for more details.


INSTALLING FOR LINUX

This installation guide assumes that you have managed to get PPP or SLIP working on your system. I assume that you are using the pppd package below. If you use SLIP or a different package, adjust accordingly.

At present, the Linux logtime binary requires the a.out shared libraries to be present on your system for it to work. You will need the a.out shared libraries 4.5.26 or later for logtime to work. Note that it is likely that future versions will have both the ELF and a.out binaries. (It is also likely that future versions will require a later version of the a.out shared libraries since I hope to upgrade all the development tools (ie, gcc, libc, etc) on my system.)

To install the Linux logtime binary, simply copy it to /usr/bin or /usr/local/bin (or any directory in your path that you fancy). Copy the manual page logtime.1 to your manual directory, such as /usr/man/man1 or /usr/local/man/man1 (whichever is appropriate for your system).

Then add logtime to the script file that is executed when a ppp or slip link is established and when the ppp or slip link is disconnected.

For a ppp connection that uses pppd, you might, for example, put the following line into your ip-up file:

logtime -D /dos/c/logtime -b

and the following line into your ip-down file:

logtime -D /dos/c/logtime -e

Note that the logtime for Linux differs from the LOGTIME for Windows in that the Linux version will search in the LOGTIME directory off the user's home directory by default for the log data files and the configuration file unless you specify otherwise. The Windows version searches for the log data files and configuration file in the directory from which the LOGTIME executable was executed. The difference is because most Unix executables (binaries) live in a common directory like /usr/bin, /usr/local/bin, /bin and the like, whereas Windows executables often live in their own directory.

You can cause logtime to search for the log and configuration file in a directory of your choice by specifying that directory in an environment variable LOGTIMEDIR or by overriding it on the command line with the -D <data path> option.

For example,

(LOGTIMEDIR=/dos/d/logtime ; logtime -b)

will cause logtime to search in the directory /dos/d/logtime and use the configuration file there and save the current time into the log file located in that directory.

And,

logtime -D /dos/c/logtime -e

will cause logtime to look into the /dos/c/logtime directory for its configuration file and clock the end of the session in a log file located in that directory.

The option -b is used to indicate to logtime the start of a session to log. The option -e indicates that the user has logged out and that logtime is to terminate the logging of time for the session.

If you wish to share the same configuration and data files for both your Linux and Windows system, install LOGTIME for Windows and its accompanying files to a directory that is mounted by Linux. In your Linux script, specify that directory to logtime.

Note that the Linux version will also create the data directory if it does not exist. This applies whether the data directory is the default directory off the user's home directory or specified via the LOGTIMEDIR environment or specified on the command line. This is different from the behaviour of the Windows version.

You will need to configure logtime so that it computes time and charges according to the rates set by your Internet Service Provider for your area. To do this create an ASCII text file called LOGTIME.INI in your logtime data directory (the directory you specify with the -D option or the LOGTIMEDIR environment variable or the default in your home directory). WARNING: the text file must be delimited by carriage return-line feed pairs and not the usual Unix line feed newline delimiters. This is because the same text file is read by the Windows LOGTIME.EXE executable. In any case, the Linux logtime also expects the file to have carriage return-line feed pairs. If you have difficulty creating such files under Linux, you might want to create the file under DOS or Windows, or copy the SAMPLE.INI to LOGTIME.INI and change the values accordingly, or configure using the Windows LOGTIME.EXE (recommended). The LOGTIME.INI file is formatted according to the usual formatting rules for Windows 3.1 INI files. The specific variables used by logtime are explained in the SAMPLE.INI file. Please refer to that file for details if you are not using the Windows LOGTIME.EXE to configure.

You must configure logtime. Otherwise it will have no idea what rates your Internet Service Provider uses, what hours constitute peak and non-peak hours, when the public holidays are, etc.


Contacting the Author

If you wish to contact me about LOGTIME , you may email me on the Internet via one of the addresses given below (if one of the addresses fail, try the other). Please note that while I generally would like to hear from you if you are using the program, and I certainly would like to know if you discover any bugs in the program, I am under no obligation to fix any bugs. In fact, I make no promises about even replying.

My current internet email addresses:

• 	cyfheng@singnet.com.sg

• 	ChristopherHeng@pobox.org.sg


GLOSSARY

Non-peak

Peak

Prepaid


NON-PEAK

Some Internet Service Providers ("ISP") charge different rates for connections made during working hours ("peak") and those made during the nights, weekends and public holidays ("non-peak").

Non-peak time or cost, therefore, refers to the amount of time or cost you have clocked during this non-peak or off-peak period. If your ISP does not differentiate between peak and non-peak periods, all your time and cost will be reflected as non-peak.


PEAK

Some Internet Service Providers ("ISP") charge different rates for connections made during working hours ("peak") and those made during the nights, weekends and public holidays ("non-peak").

Peak time or cost, therefore, refers to the amount of time or cost you have clocked during the peak period. If your ISP does not differentiate between peak and non-peak periods, all your time and cost will be reflected as non-peak.


PREPAID

Some Internet Service Providers ("ISP") allow users to use a certain block of time without additional fees (apart from a standard fee a month). Any usage of time over and above this block of time would incur additional charges. This block of time and the equivalent amount in charges is referred to here as prepaid time and prepaid charges or cost respectively. Your ISP may call it "free" usage time or the like.


Ok Button
Pressing this button will cause whatever you have entered to be accepted.


Cancel Button
Pressing this button will cancel the current operation and close the dialog box.


Help Button
Pressing this button will cause help to be displayed for this dialog box. You may also hit the F1 key to access help.


Month ComboBox
Specify the month you wish by using the arrow keys. You can cause the list of months to be displayed by entering F4 or the Alt-DownArrow key or by clicking the down arrow key on the box with the mouse. Alternatively, you can type the first letter of the month to go to the first month that begins with that letter.


Year ComboBox
Specify the Year you wish in this box. The year must be in the century format. For example, the year 1996 should be entered as 1996 and not 96.


Usage Log Ok Button
Pressing this button will close the dialog box.


Printer Button
Pressing this button will cause a Print Setup dialog box to be displayed, allowing you to change the printer and modify other printer settings for this print session.


Font Button
Pressing this button will cause a Font dialog box to be displayed, allowing you to change the font and point size for this print session.


Margins Button
Pressing this button will cause the Margins dialog box to be displayed, allowing you to change the left and right margins for this print session.


Font Face Name
This box allows you to select name of the font. You can either type in the name of the font manually or select it from the list box below.


Font Style
This box allows you to select the style of the font. You can either type in the style of the font manually or select it from the list box below. However, the style is ignored by the current version of LOGTIME .


Font Size
This box allows you to select the point size of the font. You can either type in the size of the font manually or select it from the list box below.


KEYBOARD SHORTCUTS

Here are some shortcut keys to some of commonly used the menu items.

F1 	invokes the contents page of the Help system. This is equivalent to invoking the Contents page of the Help menu.

F2 	causes LOGTIME to display the usage log for the current month. This is equivalent to the File | Current month... menu item.

F3 	causes the Usage Log for a Specific Month dialog box to be displayed where you may select a month and year for which you want the log results. This is equivalent to the File | Specific month... menu item.

F4 	causes the Delete dialog box to be displayed allowing you to choose the month and year of the log which you want deleted. This is equivalent to the File | Delete month... menu item.

^P 	(holding down the CTRL key and pressing P) will cause the Print Dialog Box to be displayed allowing you to choose the month of the year to print. This is equivalent to the File | Print... menu item.

Pressing F1 at any time will cause the Help system to display the relevant help page should there be any available.


THE FILE MENU

The File Menu allows you to perform several operations on the log file.

Current month You can check the amount of time and cost you have logged for the current month by selecting this item.

Specific month You can check the amount of time and cost you have logged for a specific month and year by selecting this item.

Delete month You can delete the log entries for a specific month and year by selecting this item. A dialog box will be displayed to ask you the month and year of the log you wish to delete.

Print You can print the log entries for a specific month and year by selecting this item.

Print Setup...  allows you to set the default printer to be used for all hard copy reports. Choosing this option will change the default printer for LOGTIME and all Windows programs.

Exit This will cause LOGTIME to terminate.


THE OPTIONS MENU

The Options Menu allows you to configure the way LOGTIME works.

The General options allow you to set the cache and deletion options, as well as to set options for the time zone, the maximizing of the LOGTIME window, and whether warning messages for erroneous log entries should be displayed.

The Charges options allow you to change options pertaining to the way time is calculated and the amount of cost allocated to each unit of time.

The Peak Times option allows you to set what is considered as peak time and non-peak time for the Internet Service Provider which you use.

The Exceptions to Peak option allows you to set the special days in the year in which the peak periods defined in the Peak Times dialog box do not apply. This might include, for example, all public holidays.

The Show Button Bar or Hide Button Bar option allows you to determine if LOGTIME should have the button bar displayed.

The Font option allows you to set the default font to be used in all your hard copy printouts of the log file.

The Margins option allows you to set the default left and right margins of your hard copy reports.


THE HELP MENU

The Help Menu allows you to access the help file for more information about LOGTIME.

The Contents page of the help file allows you to jump to various topics in the file.

The Help on Help menu item allows you to access the Windows help file on how to use the help system.

The About menu item allows you to check the version number and copyright information of the LOGTIME executable that you are running.


HOW TO CONFIGURE LOGTIME

The various dialog boxes and items accessible from the Options menu allow you to configure LOGTIME.


THE GENERAL OPTIONS DIALOG BOX

The Cache options allow you to configure the caching facility. LOGTIME uses a cache by default to speed up the calculation of the usage time for a particular month. It automatically updates the cache when needed so you should not need to use the options here.

These options allow you to cause LOGTIME to use the cache (the Enable radio button) or not to use the caching facility at all (the Disable radio button). If you suspect that the cache has been corrupted or that it is invalid, you can also check the Invalidate existing cache box. This should not be necessary since LOGTIME will automatically invalidate the cache if the cache has become corrupted or invalid.

The Deletion options allow you to set the default behaviour which LOGTIME takes when you request it to delete the usage log for a particular month. Backup old log when deleting will cause a backup copy of the current log to be made before deleting the entries (default behaviour). Confirm before deleting will cause LOGTIME to prompt you for confirmation before deleting any log entries.

The Time zone box allows you to enter your time zone relative to the UTC (or GMT). The default behaviour, if this has not been set previously is to assume GMT0 with no daylight saving time.

If the Start in maximized window check box is checked, LOGTIME will start up in a maximized window. Otherwise it will start up in whatever size Windows assigns it. If you prefer the program to be in a maximized window, you might want to check this box.

If the Warn on errors in log file check box of the General Options dialog box is checked, LOGTIME will display a message box to tell you the number of errors it encountered while reading the log file. If the message is displayed when you request for a usage log display, your log file may be corrupted or you may have started LOGTIME with the -b (or -e ) parameter without a corresponding number of -e (or -p ) parameters. Depending on how the errors arrived there, your results may or may not still be accurate.


THE CHARGES DIALOG BOX

The Charges dialog box allow you to set various options pertaining to the way LOGTIME computes the time and cost.

The Charge Unit refers to the unit of measurement LOGTIME should use to compute the cost. The cost will then be the cost per unit multiplied by the charge unit. For example if the charge unit is Per Minute (default), and the cost per unit is $1 for non-peak time, if you log a total of 100 non-peak minutes, your total cost for non-peak time will be $100. You can choose between calculating by minute or second.

The Cost per unit refers to the amount to be charged for one unit of time logged for the peak and non-peak period. If your Internet Service Provider does not differentiate between peak and non-peak time, place your cost under the non-peak section.

The Rounding options allow you to determine how LOGTIME rounds time if your charge unit is Per Minute . This applies to situations where the time logged for your session is not on a minute boundary, such as when you clock 1 minute 20 seconds. In this case, LOGTIME would need to know what to do with the 20 seconds in order to calculate the cost for the session.

Always round up causes LOGTIME to always round the time up to the next highest minute.

Round up if >= 30 seconds causes LOGTIME to round the time up to the next minute only if there is 30 seconds or more.

Likewise, Round up if >= 31 seconds causes LOGTIME to round the time up to the next minute only if there is 31 seconds or more.

Always truncate will cause LOGTIME to ignore the excess seconds in every session.

Please note that the rounding occurs for every session, ie if you clocked 2 sessions, each with 1 minute 20 seconds, and you chose Round up if >= 30 seconds , the cost will be computed on a total time of 2 minutes and not 3 minutes. The first session of 1 minute 20 seconds was rounded down to 1 minute (since it had less than 30 seconds) before being added to the time taken for the second session, which was similarly computed. Please also note that although LOGTIME will compute the time according to these rules, your total time taken for the session may still not tally with that computed by your Internet Service Provider for various other reasons. For example, your Internet Service Provider may not start and stop clocking the time at the same time as you. LOGTIME is useful only as a guide to give you a rough idea of how much time you have used.

Some Internet Service Providers allow users to use a certain block of time without additional fees (apart from a standard fee a month). Any usage of time over and above this block of time would incur additional charges. This block of time and the equivalent amount in charges is referred to here as prepaid charges . You may know this as "free" usage cost or the like.

WARNING : These options affect all usage log results displayed and printed, even for all months prior to the current month. I may, in future, implement a way so that you can selectively apply different rates (etc) for different months; this, however, is not currently implemented. If you want to save the previous months' results using the old rates, your only recourse at the present time is to print the results before changing.


THE PEAK TIMES DIALOG BOX

Some Internet Service Providers ("ISP") charge different rates for connections made during working hours ("peak") and those made during the nights, weekends and public holidays ("non-peak").

This dialog box allows you to configure which hours of which day should be considered peak to LOGTIME and which should be considered non-peak to LOGTIME .

The Day of Week box allows you to select which day of the week to configure. You may use the arrow key or the mouse button to select the day. The Hour , Min , and Sec columns will automatically be updated to hold the current values for the day you select.

The Start of Peak boxes contains the time in hour, minute and second when LOGTIME should consider the peak time to start. Likewise the End of peak boxes contain the time in hour, minute and seconds when the peak ends. The time should be entered in the 24 hour clock, ie 13:00:00 refers to 1:00pm in the afternoon.

For example, if your ISP considers that 8:00am to 6:00pm should be considered as peak time for a particular day, you can place 08 in the Hour box, 00 in the Min and 00 in the Sec box of the Start of Peak row; and 18 in the Hour box, 00 in the Min box, and 00 in the Sec box of the End of peak row.

You will need to repeat this procedure for each day of the week which has peak time.

To add or change a value for a particular day of the week, click the Day of Week you want, then click the Edit button. This will allow you to edit the time values for that day. If you made a mistake entering the times and you wish to abort your entry, hit the ESC key or click Cancel.

The Delete button allows you to delete the peak time for a selected day.

The Cancel button allows you to abort the changes that you have made. The current settings for the peak times are not changed.

The Help button allows you to summon the help screen for the dialog box.

WARNING : These options affect all usage log results displayed and printed, even for all months prior to the current month. I might implement a way so that you can selectively apply different rates (etc) for different months in future, however, as it stands, this has not yet been implemented. If you want to save the previous months' results using the old rates, your only recourse at the present time is to print the results before changing.


THE EXCEPTIONS TO PEAK DIALOG BOX

Some Internet Service Providers ("ISP") charge different rates for connections made during working hours ("peak") and those made during the nights, weekends and public holidays ("non-peak").

The Peak Times dialog box allows you to configure the hours during each day that should be considered as peak periods. The Exceptions to Peak dialog box allows you to set the days in which those peak hours do not apply. You can use this to set things like public holidays should your ISP consider the whole of public holidays to be non-peak.

The Date box allows you to set the date which is to be excepted when determining if the time clocked falls within the peak period. LOGTIME would consider the whole of the date you set here to be non-peak. Enter the value for the Day,Month and Year in the boxes given, then hit the ENTER key or press the Add button. The Year should be in century format (ie "1996" for the year 1996 instead of "96"). For example, to enter January 1, 1996 as an exception to the peak period, you would enter 1 in the Day box, select the month January in the Month box using the arrow keys or mouse, and enter the digits 1996 in the Year box.

The list box shows the days which have been configured as Exceptions to the Peak Times. You can delete any item from the list by selecting it with the mouse (or use the TAB key to move to the list box and use the arrow keys to select the item you want), and clicking the Delete button.

To edit any item in the list box, first delete it using the procedure given above, then move to the Day box (either by clicking it or using the TAB key) and enter the revised date. When you have finished entering the date, hit the ENTER key or press the Add button.

The Add button is used when you have finished entering a new date to be added to the Exceptions to Peak dialog box and want that date added to the list of exceptions. If there is no date in the Day box, clicking the Add button is equivalent to hitting the Close button.

The Delete button allows you to delete the currently selected entry in the list of currently defined exceptions. Select the entry you want to delete in the list and click the Delete button.

The Close button closes the Exceptions to Peak dialog box and saves the information you entered into the configuration file.

The Cancel button aborts the changes you have made (if any) to the exceptions to peak times list and closes the dialog box.

The Help button brings up the help screen for the dialog box.

WARNING : These options affect all usage log results displayed and printed, even for all months prior to the current month. I might implement a way so that you can selectively apply different rates (etc) for different months in future, however, as it stands, this has not yet been implemented. If you want to save the previous months' results using the old rates, your only recourse at the present time is to print the results before changing.


THE BUTTON BAR

The Button Bar allows you to do certain operations quickly with a click of the mouse.

The Show Button Bar or Hide Button Bar option found under the Options Menu allows you to determine if LOGTIME should display the button bar. If the button bar is currently displayed (the default) the Options menu will have an option Hide Button Bar. If the button bar is currently hidden, the Options menu will have an option Show Button Bar. Note that unlike many of the other options in this program, selecting this option will not cause the button bar to be shown or hidden immediately. You will have to quit LOGTIME and restart the program for the new settings to take effect. To indicate that your new selection has been acknowledged and saved to the configuration file, a message box will appear to inform you accordingly. The menu item will also be grayed to indicate to you that you have already changed the setting.

The icons have the following actions performed when you click them:

Pressing this button will cause the Usage Log Dialog Box for the current month to be displayed.

Pressing this button will cause the Usage Log for a Specific Month dialog box to be displayed.

Pressing this button will allow you to delete the log for a specific month. The Delete Log Entries Dialog Box will be displayed.

Pressing this button will allow you to print the log for a specific month. The Print Dialog Box will be displayed.

Pressing this button will allow you to activate the help system for LOGTIME

You can also get a short description on the status bar about the meaning of any button bar icon by clicking the button bar icon and holding down the mouse button till you have finished reading, and dragging the mouse off the toolbar before releasing the mouse button.


THE MARGINS DIALOG BOX

The Margins dialog box allows you to set the left and right margins for the hard copy (or printed) report. Enter the margins in the edit boxes in inches.


PRINTING THE USAGE LOG

If you wish to have a hard copy of the Usage Log for any particular month, you can print the log in one of the following ways:

• 	Choose Print from the File menu.

• 	Press Control-P (ie, hold down the Ctrl key and press the letter p.

This will cause the Print Dialog Box to be displayed.


THE PRINT DIALOG BOX

This dialog box allows you to choose the month and year of the log that you wish to print. It also allows you to temporarily select the printer, the font in which the output will appear, and the left and margins on the hardcopy.

The Month and Year boxes allow you to specify the month and year of the log that you wish to print. For example, to print the log for February 1996, select Feb in the Month box and type 1996 in the Year box. You can select the month by using the arrow keys, or clicking on the down arrow beside the month box to reveal a list of months to select. The year must be in century format, ie, if you need 1996, type all four digits "1996" and not just "96".

The Current Printer section displays the currently defined printer that LOGTIME will print to. If you wish to print to a different printer for this session, select the Printer... button.

The Printer... button allows you to select and set up the printer for this print session. This will display a Print Setup Dialog Box. The changes you make in that dialog box are not permanent; it affects the current session only. To change the printer permanently, use the Control Panel (which is supplied with Windows) to change the printer.

The Font... button allows you to select and change the font and point size for this print session. This will display a Font dialog box. Note, however, that the changes you make here are not permanent; it affects this current session only. To change the font permanently, choose Font... from the Options menu.

The Margins... button allows you to select and change the settings for the left and right margins for this print session. The changes you make here are not permanent across all print sessions. They affect only this round of printing. Choose Margins... from the Options menu to set the default margins.


CHANGING THE PRINTER

You can change the printer, on a temporary basis, for a particular session from the Print dialog box. The change of printer, when effected from the the Print dialog box will only affect the current printing session.

If you wish to change the default printer to be used by LOGTIME and all other programs running in Windows, you may choose Print Setup... from the File Menu. This will cause the Print Setup dialog box to be displayed where you can change the Windows default printer.


THE PRINT SETUP DIALOG BOX

The Print Setup dialog box allows you to set up the printer.

The Default Printer radio box shows the default printer for your system. The diagram above was taken from my system. The exact printer that will be displayed when you open this dialog box will most likely differ on your system.

The Specific Printer radio box and its accompanying drop down list box allows you to change the printer to a different printer,provided that the driver has been installed in your system. If you wish to change your printer selection, select this button and choose the printer from the drop down box.


THE STATUS BAR

The status bar at the bottom of the LOGTIME window displays a brief description of the menu items and the button bar icons.

When you select a menu item using the keyboard, the status bar text will change to describe the menu item. To get a description of the button bar icons, click the mouse button on the button bar and hold the mouse button down while you read the status text, and move the mouse cursor off the toolbar before releasing the mouse button (if you do not wish to activate the button).


STARTING AND STOPPING THE TIMER IN WINDOWS

To start the clock going when you log into your Internet Service Provider, simply run LOGTIME with the -b option (for "begin"). To stop the clock when you terminate your call, run LOGTIME with the -e option (for "end").

You would normally do this by modifying your login and logout script to run LOGTIME when you have successfully logged into or logged out of your provider.

For example, if you are running LOGTIME for Windows and are using a winsock package that uses a login and logout script file, placing the following line in your login script would cause LOGTIME to start the clock, provided, of course, your copy of LOGTIME is installed in the C:directory.

c:\logtime\logtime -b

Similarly, placing the following line would cause LOGTIME to stop the clock.

c:\logtime\logtime -e

If your winsock package does not use script files, you have no choice but to run LOGTIME -b manually each time you successfully connect and run LOGTIME -e each time you disconnect. In such a case, you might want to use the Program Manager to create a program item for LOGTIME  to start the clock and one to stop the clock. You can do this by setting the command line for the start clock icon to "c:\logtime\logtime -b" and the command line for the stop clock icon to "c:\logtime\logtime -e". Again, we are assuming that you have installed LOGTIME to the c:\logtime directory.

You can share the same configuration and data files between your Linux and Windows versions of LOGTIME . Check out Installing for Linux for more details.


STARTING AND STOPPING THE TIMER IN LINUX

To start the clock going when you log into your Internet Service Provider, simply run logtime with the -b option (for "begin"). To stop the clock when you terminate your call, run logtime with the -e option (for "end").

You would normally do this by modifying your login and logout script to run logtime when you have successfully logged into or logged out of your provider.

For example, if you were running logtime for Linux and connecting to your provider via ppp, you might add the following line to your /etc/ppp/ip-up file.

logtime -b

Similarly you might add the following line to your /etc/ppp/ip-down file to stop the clock.

logtime -e

This will cause logtime to read its configuration file from the logtime directory in your home directory and clock the time to a data file in the same directory. See Installing for Linux for more details, especially on how to cause logtime to use a different directory.

You can share the same configuration and data files between your Linux and Windows versions of logtime . Check out Installing for Linux for more details.


HOW TO UNINSTALL LOGTIME

To uninstall LOGTIME , take the following steps:

• 	If you run LOGTIME from a script file to start the timer (-b) and stop the timer (-e), remove those lines from the script file. Remember to remove the lines from the script file for both your Windows winsock package as well as from the Linux SLIP/PPP script files if you installed LOGTIME for more than one target.

• 	If you have installed the LOGTIME icon in a Program Manager group under Windows, you should remove the icon. Select the LOGTIME icon and choose Delete from the File menu under Program Manager.

• 	Go to the directory where LOGTIME was installed, and delete LOGTIME.EXE, LOGTIME.HLP, LOGTIME.INI, LOGTIME.DAT, LOGTIME.CAC, SAMPLE.INI and (if you installed the Linux binary here) LOGTIME. You may remove the logtime directory as well. If you installed your Linux logtime binary into a different directory on your Linux partition, remember to remove that as well.

You have now uninstalled LOGTIME .


HOW TO CHECK YOUR LOGIN USAGE

You can check the amount of time and cost you have logged for the current month in a few ways:

• 	Choose Current Month from the File menu.

• 	Press the F2 key using the keyboard.

This will allow you to view the Usage Log dialog box

You can also choose to check the amount of time and cost you have accumulated for a specific month and year that is not the current month:

• 	Choose Specific Month from the File menu.

• 	Press the F3 key using the keyboard.

This will cause LOGTIME to display a dialog box requesting you for the month and year you wish to display. See Usage Log for a Specific Month.


THE USAGE LOG DIALOG BOX

The Usage Log Dialog Box contains the information about the amount of time you have logged and the charges incurred.

The month and year for which the dialog box results are displayed is indicated in the top left of the dialog box. The same dialog box is used to display the usage log for both the current month as well as for a month you specify.

Peak refers to the amount of time and cost you have clocked during peak hours. Some Internet Service Providers ("ISP") charge different rates for connections made during working hours ("peak") and those made during the night and weekends ("non-peak"). If your ISP does this, the peak row shows the amount of time and charge you have accumulated in the peak period.

Non-peak refers to the amount of time and cost you have clocked during the non-peak or off-peak hours. For ISPs that do not differentiate between peak and non-peak rates, the amount of time and cost you have accumulated will be shown here.

Total time charged refers to the total of non-peak and peak time. For the purposes of calculating the total, the amount of peak time clocked is converted to non-peak time and added to the non-peak hours.

Total cost refers to the total of non-peak and peak costs.

Prepaid time and prepaid cost refer to the block of time and the equivalent amount in charges which your Internet Service Provider ("ISP") gives you each month to use without incurring additional charges over your standard monthly fee. Some ISPs call this "free" usage time. If your ISP does not give you any prepaid (or free usage) time/cost, this will be zero.

Remainder or Exceeded By is the difference in the prepaid time/cost and the total amount of time/cost you have clocked up so far during the month. If you have exceeded the prepaid time/cost, "Exceeded" will be displayed. Otherwise, "Remainder" will be displayed.


USAGE LOG FOR A SPECIFIC MONTH

This dialog box allows you to view the usage log for a month and year you specify. When you choose this option, the following dialog box will first appear.

Month allows to choose a month for which you want the usage log results. It is a drop down box which contains the names of all the months of the year. If you use the mouse, click the down arrow to display all the months of the year and choose from that list. If you use the keyboard, you can hit F4 or Alt-DownArrow to cause the drop down list box to display the months of the year, or use the arrow key to scroll down the list of months, or type the first letter of the month to go to the first month that begins with that letter.

Year allows you to enter the year for which you want the log results. The year must be in the century format. For example, the year 1996 should be entered as 1996 and not 96.

When you select the Ok button, the Usage Log dialog box will be displayed.